//控制器
import { GUI } from "three/examples/jsm/libs/lil-gui.module.min.js"
export class Gui{
    gui = new GUI()
    constructor(element,property){
        this.element=element
        this.property=property
    }
    screen(){
        let eventObj={
            isFullscreen:function(){
                const fullScreenElement = document.fullscreenElement;
                if (!fullScreenElement) {
                    //   双击控制屏幕进入全屏，退出全屏
                    // 让画布对象全屏
                    document.body.requestFullscreen();
                } else {
                    //   退出全屏，使用document对象
                    document.exitFullscreen();
                }
            },
        }
        this.gui.add(eventObj,"isFullscreen").name('切换全屏')
    }
    aoMapIntensity(a){
        let target = this.gui.addFolder('井盖')
        target.add(a,"aoMapIntensity").min(0).max(1).name('透明')
    }
    wireframe(a){
        let target = this.gui.addFolder('绿色立方体')
        target.add(a,'wireframe').name('线框').onChange((v)=>{
            console.log(v)
        })
    }
}


